﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<%@ Register src="uc/header.ascx" tagname="header" tagprefix="uc1" %>

<%@ Register src="uc/footer.ascx" tagname="footer" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <link href="css/search.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <uc1:header ID="header1" runat="server" />
    
 <div id="wrapper" style=" padding:10px 0px;">

   <div class="title3"><div class="search_title">搜索结果</div></div>
 <div id="main">
  <div class="title"><input name="txt_code" id="txt_code" type="text" style="width:200px;"  class="mlr5" value="<%=code %>"/>
  <input id="hid_t" type="hidden" value="" />
  <input name="" id="soCode" type="button"  value="查询"/>
<script type='text/javascript' src='http://down3.emstock.com.cn/www/js/jquery.autocomplete.pack.js'></script>
<script src="http://down3.emstock.com.cn/www/js/StockJS.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://down3.emstock.com.cn/www/css/jquery.autocomplete.css" />
        <script type="text/javascript">
            $(document).ready(function () {
                $("#txt_code").autocomplete(EALists, {
                    max: 8,
                    minChars: 0,
                    width: 200,
                    matchContains: true,
                    autoFill: false,
                    formatItem: function (row, i, max) {
                        return row._C + " " + row._N + " " + row._T;
                    },
                    formatMatch: function (row, i, max) {
                        return row._C + " " + row._S + " " + row._N;
                    },
                    formatResult: function (row) {

                        return row._C;
                    }
                }).result(function (event, row, formatted) {
                    $("#hid_t").val(row._F);
                });

                $("#txt_code").focus(function () {
                    if ($("#txt_code").val() == "输入股票代码/名称/简拼")
                        $("#txt_code").val("");
                });
                $("#txt_code").blur(function () {
                    if ($("#txt_code").val() == "")
                        $("#txt_code").val("输入股票代码/名称/简拼");
                });

                $("#txt_code").submit(function () {
                    document.location.href = 'Search.aspx?c=' + $("#txt_code").val() + '&f=' + $("#hid_t").val();
                    return false;
                });
                $("#soCode").click(function () {
                    document.location.href = 'Search.aspx?c=' + $("#txt_code").val() + '&f=' + $("#hid_t").val();
                });
                return false;
            })
        </script>

  </div><br />
    <%=strRel%>
 </div><!--main-end-->
</div><!--wrapper-end-->
    <uc2:footer ID="footer1" runat="server" />
&nbsp;</form>
</body>
</html>
